@{
    ViewData["Title"] = "积分明细列表";
    Layout = "~/Areas/Manager/Views/Shared/_Layout.cshtml";
}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">积分明细</div>
                <div class="layui-card-body">
                    <div class="layui-form">
                        <div class="layui-row">
                            <div class="layui-form-item">
                                <div class="layui-col-md2" style="padding-left:0">
                                    <input id="Start" lay-filter="Start" class="layui-input" placeholder="起始时间"  />
                                </div>
                                <div class="layui-col-md2" style="padding-left:0">
                                    <input id="End" lay-filter="End" class="layui-input"  placeholder="结束时间" />
                                </div>
                                <div class="layui-col-md3">
                                    <div class="input-group">
                                        <input type="text" id="keyWords" name="keyWords" placeholder="请输入用户名称" autocomplete="off" class="layui-input">
                                        <span class="input-group-btn">
                                            <button class="layui-btn" id="search">
                                                <i class="layui-icon layui-icon-search"></i>
                                            </button>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <table class="layui-table" lay-data="{page:true, id:'list'}" lay-filter="list">
                            <thead>
                                <tr>
                                    <th lay-data="{checkbox:true, fixed: true}"></th>
                                    <th lay-data="{ field: 'createdDate',width:250}">创建时间</th>
                                    <th lay-data="{ field: 'userId',width:120}"> 用户Id</th>
                                    <th lay-data="{ field: 'score',width:120}">影响分数</th>
                                    <th lay-data="{ field: 'type',templet:'#type',width:120}">类型</th>
                                    <th lay-data="{ field: 'description'}">积分描述</th>
                                </tr>
                            </thead>
                        </table>
                        <script type="text/html" id="type">
                            {{#  if(d.type==0){  }}
                            <span class="layui-badge layui-bg-green">获得积分</span>
                            {{#  } else if(d.type==1){ }}
                            <span class="layui-badge layui-bg-orange">消费积分</span>
                            {{#  } }}
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@section scriptsfeet
    {
    <script type="text/javascript">
        layui.config({
            base: '/layuiadmin/' //自定义模块路径
        }).use(['sykjwh', 'table', 'laydate'], function () {
            var $ = layui.$, sykjwh = layui.sykjwh, table = layui.table, laydate = layui.laydate;

            //绑定数据
            sykjwh.dataBind('@Url.Action("PointsDetailList", "Member", new { area = Constant.AREAMANAGER })');

            //搜索
            $("#search").click(function () {
                //绑定数据
                sykjwh.dataBind('@Url.Action("PointsDetailList", "Member", new { area = Constant.AREAMANAGER })', {
                    keyWords: $.trim($("#keyWords").val()),
                    start: $.trim($("#Start").val()),
                    end: $.trim($("#End").val())
                });
            });

            //日期
            laydate.render({
                elem: '#Start'
            });
            laydate.render({
                elem: '#End'
            });

        });
    </script>
}